home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / oleo-1_4.lha / oleo-1.4 / defun.h < prev    next >
C/C++ Source or Header  |  1993-05-23  |  67KB  |  2,275 lines

  1.  
  2. #if 0
  3. DEFUN ("enter-string-in-cell",
  4.        FDenter_string_in_cell, FAenter_string_in_cell, 0) /* fixme */
  5. #ifdef FUNC_ARG_STRINGS
  6. "sEnter string for %c? ",
  7. #endif
  8. #ifdef DOC_STRINGS
  9. "Quote STRING appropriately and store it in the current cell.",
  10. "Called interactively, this is a way to store a string in a cell without",
  11. "having to enclose it in quotes.",
  12. #endif
  13. #endif /* NOT USED */
  14.  
  15. /* squeek squeek */
  16. DEFUN_3 ("mouse-goto", FDmouse_goto, mouse_goto_cmd)
  17. DEFUN_3 ("mouse-mark", FDmouse_mark, mouse_mark_cmd)
  18. DEFUN_3 ("mouse-mark-and-goto",
  19.      FDmouse_mark_and_goto_cmd, mouse_mark_and_goto_cmd)
  20.  
  21. #if 0
  22. DEFUN ("sort-region", "tj", sort_region_cmd)
  23. #endif
  24.     
  25.  
  26.  
  27.  
  28. DEFUN_3 ("exit-minibuffer", FDexit_minibuffer, exit_minibuffer)
  29. #ifdef DOC_STRINGS
  30. "Terminate this minibuffer argument.",
  31. "If no valid argument has been given, an error is reported.",
  32. #endif
  33.  
  34. DEFUN_3 ("break",  FDbreak, 0)
  35. #ifdef DOC_STRINGS
  36. "Abort the current complex command or incomplete keysequence.",
  37. #endif
  38.  
  39.  
  40. DEFUN_3 ("universal-argument", FDuniversal_argument, 0)
  41. #ifdef DOC_STRINGS
  42. "Begin a numeric argument for the following command.",
  43. "Digits or minus sign following this command make up the numeric argument.",
  44. "If no digits or minus sign follow, this by itself provides 4 as argument.",
  45. "Used more than once, this command multiplies the argument by 4 each time.",
  46. #endif
  47.  
  48.  
  49. DEFUN ("kill-oleo", FDkill_oleo, FAkill_oleo, kill_oleo)
  50. #ifdef FUNC_ARG_STRINGS
  51. "MSpreadsheet modified.  Quit without saving? (yes or no) ",
  52. #endif
  53. #ifdef DOC_STRINGS
  54. "Kill this Oleo.  This does NOT save any files.",
  55. #endif
  56.  
  57. DEFUN_3 ("redraw-screen", FDredraw_screen, redraw_screen)
  58. #ifdef DOC_STRINGS
  59. "Center the cell cursor in the current window and redisplay the screen.",
  60. #endif
  61.  
  62. DEFUN_3 ("suspend-oleo", FDsuspend_oleo, suspend_oleo)
  63. #ifdef DOC_STRINGS
  64. "Stop Oleo and return to it's superior process.  Oleo may be resumed.",
  65. #endif
  66.  
  67.  
  68. DEFUN ("recalculate", FDrecalculate, FArecalculate, recalculate)
  69. #ifdef FUNC_ARG_STRINGS
  70. "p?",
  71. #endif
  72. #ifdef DOC_STRINGS
  73. "Recompute any cells that need it.  With a prefix arg, recompute all cells.",
  74. #endif
  75.  
  76. DEFUN ("execute-command",
  77.        FDexecute_command, FAexecute_command, execute_command)
  78. #ifdef FUNC_ARG_STRINGS
  79. "CM-x ",
  80. #endif
  81. #ifdef DOC_STRINGS
  82. "Read command name, then read its arguments and call it.",
  83. #endif
  84.  
  85. DEFUN ("with-keymap", FAwith_keymap, FDwith_keymap, with_keymap)
  86. #ifdef FUNC_ARG_STRINGS
  87. "SWith which keymap? ",
  88. "m%0",
  89. #endif
  90. #ifdef DOC_STRINGS
  91. "Create a user context in which KEYMAP is the top level keymap.",
  92. "Commands will be read in the context until an exit-minibuffer or",
  93. "break command is executed.",
  94. #endif
  95.  
  96. DEFUN ("one-command-with-keymap", FAone_cmd_with_keymap,
  97.        FDone_cmd_with_keymap, one_cmd_with_keymap)
  98. #ifdef FUNC_ARG_STRINGS
  99. "SWith which keymap? ",
  100. "m'%0",
  101. #endif
  102. #ifdef DOC_STRINGS
  103. "Create a user context in which KEYMAP is the top level keymap.",
  104. "Commands will be read in the context until an exit-minibuffer or",
  105. "break command is executed.",
  106. #endif
  107.  
  108.  
  109.  
  110.  
  111.   /* By convention, motion and scrolling commands take a magic number
  112.    * as their first argument.  The number tells which direction to move.
  113.    * 0 == up, 1 == down, etc.
  114.    */
  115. DEFUN ("up-cell", FDup_cell, FAup_cell, shift_cell_cursor)
  116. #ifdef FUNC_ARG_STRINGS
  117. "+#0",
  118. "p",
  119. #endif
  120. #ifdef DOC_STRINGS
  121. "Move cursor up ARG rows.",
  122. #endif
  123. DEFUN ("down-cell", FDdown_cell, FAdown_cell, shift_cell_cursor)
  124. #ifdef FUNC_ARG_STRINGS
  125. "+#1",
  126. "p",
  127. #endif
  128. #ifdef DOC_STRINGS
  129. "Move cursor down ARG rows.",
  130. #endif
  131. DEFUN ("right-cell", FDright_cell, FAright_cell, shift_cell_cursor)
  132. #ifdef FUNC_ARG_STRINGS
  133. "+#2",
  134. "p",
  135. #endif
  136. #ifdef DOC_STRINGS
  137. "Move cursor right ARG cols.",
  138. #endif
  139. DEFUN ("left-cell", FDleft_cell, FAleft_cell, shift_cell_cursor)
  140. #ifdef FUNC_ARG_STRINGS
  141. "+#3",
  142. "p",
  143. #endif
  144. #ifndef fnord
  145. #define fnord    0
  146. #endif
  147. #ifdef DOC_STRINGS
  148. "Move cursor left ARG cols.",
  149. #endif
  150. DEFUN ("upright-cell", FDupright_cell, FAupright_cell, shift_cell_cursor)
  151. #ifdef FUNC_ARG_STRINGS
  152. "+#4",
  153. "p",
  154. #endif
  155. #ifdef DOC_STRINGS
  156. "Move cursor upright ARG rows and cols.",
  157. #endif
  158. DEFUN ("upleft-cell", FDupleft_cell, FAupleft_cell, shift_cell_cursor)
  159. #ifdef FUNC_ARG_STRINGS
  160. "+#5",
  161. "p",
  162. #endif
  163. #ifdef DOC_STRINGS
  164. "Move cursor upleft ARG rows and cols.",
  165. #endif
  166. DEFUN ("downright-cell", FDdownright_cell, FAdownright_cell, shift_cell_cursor)
  167. #ifdef FUNC_ARG_STRINGS
  168. "+#6",
  169. "p",
  170. #endif
  171. #ifdef DOC_STRINGS
  172. "Move cursor downright ARG rows and cols.",
  173. #endif
  174. DEFUN ("downleft-cell", FDdownleft_cell, FAdownleft_cell, shift_cell_cursor)
  175. #ifdef FUNC_ARG_STRINGS
  176. "+#7",
  177. "p",
  178. #endif
  179. #ifdef DOC_STRINGS
  180. "Move cursor downleft ARG rows and cols.",
  181. #endif
  182.  
  183.  
  184.  
  185. DEFUN ("goto-cell", FDgoto_cell, FAgoto_cell, goto_cell)
  186. #ifdef FUNC_ARG_STRINGS
  187. "RGoto cell? ",
  188. #endif
  189. #ifdef DOC_STRINGS
  190. "Goto CELL by name.  If a region is given, the upper-left corner is used.",
  191. #endif
  192.  
  193. DEFUN ("goto-region", FDgoto_region, FAgoto_region, goto_region)
  194. #ifdef FUNC_ARG_STRINGS
  195. "RGoto region? ",
  196. #endif
  197. #ifdef DOC_STRINGS
  198. "Select REGION by name.",
  199. "The cell cursor is moved to the upper left corner, and the mark is placed",
  200. "at the lower right.",
  201. #endif
  202.  
  203.  
  204.  
  205. /* Some interestingly extreme commands. */
  206.  
  207. DEFUN_3 ("upper-left", FDupper_left, upper_left)
  208. #ifdef DOC_STRINGS
  209. "Move the cell cursor to the first row and column.",
  210. #endif
  211.  
  212. DEFUN_3 ("lower-left", FDlower_left, lower_left)
  213. #ifdef DOC_STRINGS
  214. "Move the cell cursor to the last filled row and first column.",
  215. #endif
  216.  
  217. DEFUN_3 ("upper-right", FDupper_right, upper_right)
  218. #ifdef DOC_STRINGS
  219. "Move the cell cursor to the first row and rightmost filled column.",
  220. #endif
  221.  
  222. DEFUN_3 ("lower-right", FDlower_right, lower_right)
  223. #ifdef DOC_STRINGS
  224. "Move the cell cursor to the last filled row and column.",
  225. #endif
  226.  
  227. DEFUN ("exchange-point-and-mark", FDexchange_point_and_mark,
  228.        FAexchange_point_and_mark, exchange_point_and_mark)
  229. #ifdef FUNC_ARG_STRINGS
  230. "p?",
  231. #endif
  232. #ifdef DOC_STRINGS
  233. "Mark the current cell, but move the cell cursor to where the mark is now.",
  234. "With a prefix argument, the mark is cleared the the cell curor remains where",
  235. "it is.",
  236. #endif
  237.  
  238. DEFUN ("mark-cell", FDmark_cell_cmd, FAmark_cell_cmd, mark_cell_cmd)
  239. #ifdef FUNC_ARG_STRINGS
  240. "p?",
  241. #endif
  242. #ifdef DOC_STRINGS
  243. "Mark the current cell. With a prefix arg, pop the mark.",
  244. #endif
  245.  
  246. DEFUN_3 ("clear-mark", FDclear_mark, unmark_cmd)
  247. #ifdef DOC_STRINGS
  248. "Unset the mark.",
  249. #endif
  250.  
  251.  
  252.  
  253. DEFUN ("scroll-up", FDscroll_up, FAscroll_up, scroll_cell_cursor)
  254. #ifdef FUNC_ARG_STRINGS
  255. "+#0",
  256. "p",
  257. #endif
  258. #ifdef DOC_STRINGS
  259. "Scroll the current window up ARG rows; or near full screen if no ARG.",
  260. #endif
  261. DEFUN ("scroll-down", FDscroll_down, FAscroll_down, scroll_cell_cursor)
  262. #ifdef FUNC_ARG_STRINGS
  263. "+#1",
  264. "p",
  265. #endif
  266. #ifdef DOC_STRINGS
  267. "Scroll the current window down ARG rows; or near full screen if no ARG.",
  268. #endif
  269. DEFUN ("scroll-right", FDscroll_right, FAscroll_right, scroll_cell_cursor)
  270. #ifdef FUNC_ARG_STRINGS
  271. "+#2",
  272. "p",
  273. #endif
  274. #ifdef DOC_STRINGS
  275. "Scroll the current window right ARG cols; or near full screen if no ARG.",
  276. #endif
  277. DEFUN ("scroll-left", FDscroll_left, FAscroll_left, scroll_cell_cursor)
  278. #ifdef FUNC_ARG_STRINGS
  279. "+#3",
  280. "p",
  281. #endif
  282. #ifdef DOC_STRINGS
  283. "Scroll the current window left ARG cols; or near full screen if no ARG.",
  284. #endif
  285. DEFUN ("scroll-upright", FDscroll_upright, FAscroll_upright,
  286.        scroll_cell_cursor)
  287. #ifdef FUNC_ARG_STRINGS
  288. "+#4",
  289. "p",
  290. #endif
  291. #ifdef DOC_STRINGS
  292. "Scroll the current window upright ARG row/cols; or a full screen if no ARG.",
  293. #endif
  294. DEFUN ("scroll-upleft", FDscroll_upleft, FAscroll_upleft, scroll_cell_cursor)
  295. #ifdef FUNC_ARG_STRINGS
  296. "+#5",
  297. "p",
  298. #endif
  299. #ifdef DOC_STRINGS
  300. "Scroll the current window upleft ARG row/cols; or full screen if no ARG.",
  301. #endif
  302. DEFUN ("scroll-downright", FDscroll_downright, FAscroll_downright,
  303.        scroll_cell_cursor) 
  304. #ifdef FUNC_ARG_STRINGS
  305. "+#6",
  306. "p",
  307. #endif
  308. #ifdef DOC_STRINGS
  309. "Scroll the current window downright ARG row/cols; or a full screen w/no ARG.",
  310. #endif
  311. DEFUN ("scroll-downleft", FDscroll_downleft, FAscroll_downleft,
  312.        scroll_cell_cursor) 
  313. #ifdef FUNC_ARG_STRINGS
  314. "+#7",
  315. "p",
  316. #endif
  317. #ifdef DOC_STRINGS
  318. "Scroll the current window downleft ARG row/cols; or a full screen if no ARG.",
  319. #endif
  320.  
  321.  
  322. DEFUN ("scan-up", FDscan_up, FAscan_up, scan_cell_cursor)
  323. #ifdef FUNC_ARG_STRINGS
  324. "+#0",
  325. "p",
  326. #endif
  327. #ifdef DOC_STRINGS
  328. "Move up to the next border between filled and empty cells.",
  329. "With an argument, moves to the Nth border.",
  330. #endif
  331. DEFUN ("scan-down", FDscan_down, FAscan_down, scan_cell_cursor)
  332. #ifdef FUNC_ARG_STRINGS
  333. "+#1",
  334. "p",
  335. #endif
  336. #ifdef DOC_STRINGS
  337. "Move down to the next border between filled and empty cells.",
  338. "With an argument, moves to the Nth border.",
  339. #endif
  340. DEFUN ("scan-right", FDscan_right, FAscan_right, scan_cell_cursor)
  341. #ifdef FUNC_ARG_STRINGS
  342. "+#2",
  343. "p",
  344. #endif
  345. #ifdef DOC_STRINGS
  346. "Move right to the next border between filled and empty cells.",
  347. "With an argument, moves to the Nth border.",
  348. #endif
  349. DEFUN ("scan-left", FDscan_left, FAscan_left, scan_cell_cursor)
  350. #ifdef FUNC_ARG_STRINGS
  351. "+#3",
  352. "p",
  353. #endif
  354. #ifdef DOC_STRINGS
  355. "Move left to the next border between filled and empty cells.",
  356. "With an argument, moves to the Nth border.",
  357. #endif
  358.  
  359.  
  360. DEFUN ("beginning-of-row",
  361.        FDbeginning_of_row, FAbeginning_of_row, beginning_of_row)
  362. #ifdef FUNC_ARG_STRINGS
  363. "p",
  364. #endif
  365. #ifdef DOC_STRINGS
  366. "Move point to beginning of the current row.",
  367. "With a prefix argument, move forward ARG - 1 rows first.",
  368. #endif
  369. DEFUN ("beginning-of-col",
  370.        FDbeginning_of_col, FAbeginning_of_col, beginning_of_col)
  371. #ifdef FUNC_ARG_STRINGS
  372. "p",
  373. #endif
  374. #ifdef DOC_STRINGS
  375. "Move point to beginning of the current col.",
  376. "With a prefix argument, move forward ARG - 1 cols first.",
  377. #endif
  378.  
  379. DEFUN ("end-of-row", FDend_of_row, FAend_of_row, end_of_row)
  380. #ifdef FUNC_ARG_STRINGS
  381. "p",
  382. #endif
  383. #ifdef DOC_STRINGS
  384. "Move point to end of the current row.",
  385. "With a prefix argument, move forward ARG - 1 rows first.",
  386. #endif
  387. DEFUN ("end-of-col", FDend_of_col, FAend_of_col, end_of_col)
  388. #ifdef FUNC_ARG_STRINGS
  389. "p",
  390. #endif
  391. #ifdef DOC_STRINGS
  392. "Move point to end of the current col.",
  393. "With a prefix argument, move forward ARG - 1 cols first.",
  394. #endif
  395.  
  396.  
  397.   
  398. DEFUN_3 ("start-entering-macro", FDstart_entering_macro, start_entering_macro)
  399. #ifdef DOC_STRINGS
  400. "Record subsequent keyboard input, defining a keyboard macro.",
  401. "The commands are recorded even as they are executed.",
  402. "Use [stop-entering-macro] to finish recording and make the macro available.",
  403. "Use [store-last-macro] to record the macro in a spreadsheet cell.",
  404. #if 0
  405. Should support this:
  406. Non-nil arg (prefix arg) means append to last macro defined;
  407. This begins by re-executing that macro as if you typed it again.
  408. #endif
  409. #endif
  410.  
  411. DEFUN_3 ("stop-entering-macro", FDstop_entering_macro, stop_entering_macro)
  412. #ifdef DOC_STRINGS
  413. "Finish defining a keyboard macro.",
  414. "The definition was started by [start-entering-macro]",
  415. "The macro is now available for use via [call-last-kbd-macro]",
  416. "or it can be given a name with [store-last-macro] and then invoked",
  417. "by passing it's cell address to [execute-command].",
  418. #if 0
  419. "With numeric arg, repeat macro now that many times,",
  420. "counting the definition just completed as the first repetition.",
  421. #endif
  422. #endif
  423.  
  424. DEFUN ("call-last-kbd-macro", FDcall_last_kbd_macro,
  425.        FAcall_last_kbd_macro, call_last_kbd_macro)
  426. #ifdef FUNC_ARG_STRINGS
  427. "p",
  428. #endif
  429. #ifdef DOC_STRINGS
  430. "Call the last keyboard macro that you defined with [start-entering-macro].",
  431. "To make a macro permanent so you can call it even after",
  432. "defining others, use [store-last-macro].",
  433. #endif
  434.  
  435. DEFUN_3 ("end-macro", FDend_macro, end_macro)
  436. #ifdef DOC_STRINGS
  437. "This function is for internal use only.",
  438. "Oleo executes this command as part of the process of executing a kbd  macro.",
  439. #endif
  440.  
  441. DEFUN ("store-last-macro",
  442.        FDstore_last_macro, FAstore_last_macro, store_last_macro) 
  443. #ifdef FUNC_ARG_STRINGS
  444. "rStore at? ",
  445. #endif
  446. #ifdef DOC_STRINGS
  447. "Saves the most recently defined keyboard macro in a spreadsheet cell.",
  448. "The sole argument is the cell address at which to store the macro.",
  449. "Thereafter, that cell address is a valid argument to [execute-command].",
  450. #endif
  451.  
  452. DEFUN ("run-string-as-macro",
  453.        FDrun_string_as_macro, FArun_string_as_macro, run_string_as_macro)
  454. #ifdef FUNC_ARG_STRINGS
  455. "sRun macro string: ",
  456. #endif
  457. #ifdef DOC_STRINGS
  458. "Execute STRING as a keyboard macro.",
  459. #endif
  460.  
  461. DEFUN ("name-macro-string",
  462.        FDname_macro_string, FAname_macro_string, name_macro_string)
  463. #ifdef FUNC_ARG_STRINGS
  464. "SName for macro? ",
  465. "sMacro %s? ",
  466. #endif
  467. #ifdef DOC_STRINGS
  468. "Assign NAME to MACRO.",
  469. "The name functions like any interactive command name.",
  470. "When invoked, the command executes the macro string, using the prefix",
  471. "as a repeat count.",
  472. #endif
  473.  
  474.  
  475.  
  476. DEFUN_3 ("show-options", FDshow_options, show_options)
  477. #ifdef DOC_STRINGS
  478. "Show the current state of all the spreadsheet options.",
  479. "Also shows the current definitions for all the user-defined variables.",
  480. #endif
  481.  
  482. DEFUN ("set-option", FDset_option, FAset_option, set_options)
  483. #ifdef FUNC_ARG_STRINGS
  484. "sSet option? ",
  485. #endif
  486. #ifdef DOC_STRINGS
  487. "Change the value of a user-controlled option.",
  488. "",
  489. "Currently Supported Options:",
  490. "",
  491. "(no)a0        In a0 mode, Oleo uses cell-addresses like `A1'.",
  492. "        In noa0 mode, Oleo uses `R1C1' style addresses.",
  493. "",
  494. "(no)auto    In auto mode, cells whose values may have chaged are",
  495. "        automatically recalculated.  In noauto mode, cells are only",
  496. "        recalculated when the recalculate command is used.",
  497. "",
  498. "(no)background    In background mode, automatic recalculation is done while",
  499. "(no)bkgrnd    the spreadsheet waits for you to type a key (and stops while",
  500. "        the key is being handled).  In nobackground mode, Oleo",
  501. "        performs all its recalculation before listening for",
  502. "        keystrokes.",
  503. "",
  504. "(no)backup    In backup mode, whenever the spreadsheet writes out a file,",
  505. "        if the file already exists, a backup copy is made (similarly",
  506. "        to Emacs).",
  507. "",
  508. "(no)bkup_copy    In nobackup mode bkup_copy is ignored.  In bkup_copy mode,",
  509. "        backup files are made by copying the original file, instead",
  510. "        of renaming it.",
  511. "",
  512. "ticks (number)    This value controls how often, in seconds, time-dependant",
  513. "        formulas are reevaluated.",
  514. "",
  515. "print (number)    This is the width of the page for the print command.",
  516. "        The default value is the width of the screen.",
  517. "",
  518. "file (format-name)  This sets format Oleo will use when reading and writing",
  519. "        spreadsheet files.  Valid format names are:",
  520. "         oleo        - The default (and supported) format.",
  521. "         sylk        - A partial implementation of a std. format.",
  522. "         sc        - partial SC compatability.  This is buggy.",
  523. "         list        - An ascii (lines of fields) format.",
  524. "                  This is not a complete file format",
  525. "                  but may be useful for importing/exporting",
  526. "                  data.",
  527. "",
  528. "list ch    Use the character CH to separate the cell values when using ",
  529. "        the `list' file format.",
  530. "",
  531. "status (n)    This option controls which line on the screen is used for",
  532. "        displaying the status of the current cell.  The number may be",
  533. "        positive, (counting down from the top), negative (counting up",
  534. "        from the bottom, or zero (disabling the status line).",
  535. "",
  536. "input (n)    This option controls which line on the screen is used for",
  537. "        reading lines of text.  The number may be positive (counting",
  538. "        down from the top), or negative (counting up from the",
  539. "        bottom), but not zero.",
  540. "",
  541. "The following options affect the currently active window:",
  542. "",
  543. "(no)page    In page mode, whenever a paticular cell is",
  544. "        displayed in the window, it will always be in the same",
  545. "        location on the screen.  In page mode, the recenter command",
  546. "        acts just like the redraw-screen command.",
  547. "",
  548. "(no)pageh    These options turns on or off page mode only in",
  549. "(no)pagev    the horizontal or vertical axis.",
  550. "",
  551. "(no)lockh    These options prevent the cell cursor in the current window",
  552. "(no)lockv    from moving in the horizontal or vertical direction, but only",
  553. "        when the cell cursor is moved in a window that this one is",
  554. "        linked.",
  555. "",
  556. "",
  557. "(no)edges    In edges mode oleo displays Row and Column numbers at the top",
  558. "        and left edges of the window.  Perhaps edges should be split",
  559. "        into edgeh and edgev?",
  560. "",
  561. "(no)standout    In standout mode, the edges (see (no)edges) are drawn in",
  562. "        standout mode (reverse video, usually).",
  563. #endif
  564.  
  565.  
  566.  
  567. DEFUN ("show-variable", FDshow_variable, FAshow_variable, show_var)
  568. #ifdef FUNC_ARG_STRINGS
  569. "SShow Variable? ",
  570. #endif
  571. #ifdef DOC_STRINGS
  572. "Report the current binding of a user-defined variable.",
  573. "Variables can be defined using the [set-variable].",
  574. #endif
  575.       
  576. DEFUN_3 ("show-all-variables", FDshow_all_variables, show_all_var)
  577. #ifdef DOC_STRINGS
  578. "Report the current bindings of all user-defined variables.",
  579. "Variables can be defined using the [set-variable].",
  580. #endif
  581.  
  582. DEFUN ("set-variable", FDset_var, FAset_var, set_var)
  583. #ifdef FUNC_ARG_STRINGS
  584. "SSet Variable? ",
  585. "sSet %0 to? ",
  586. #endif
  587. #ifdef DOC_STRINGS
  588. "Change the binding of a user-defined variable.",
  589. "Variables can be bound to cells or ranges of cells, and then referenced",
  590. "in formulas wherever a cell or range reference is allowed.",
  591. "If no new binding is given, then the variable becomes unbound.",
  592. #endif
  593.  
  594.  
  595.  
  596. DEFUN ("create-keymap", FDcreate_keymap, FAcreate_keymap, create_keymap)
  597. #ifdef FUNC_ARG_STRINGS
  598. "SCreate Kemap? ",
  599. "S'Parent map? ",
  600. #endif
  601. #ifdef DOC_STRINGS
  602. "Create a new keymap given it's NAME and PARENT.",
  603. "",
  604. "A keymap is a mapping from characters to commands and keymap.  As you type",
  605. "characters to Oleo, keymaps are used to decide how to interpret your",
  606. "keystrokes.  Emacs users are familiar with this concept, but should note",
  607. "that Oleo keymaps do not behave quite like Emacs keymaps.",
  608. "",
  609. "Every keymap has a (unique) name.  That name is used, for example, as an",
  610. "argument to the bind-key command.",
  611. "",
  612. "Every keymap has a parent map that is searched for bindings of keys that",
  613. "are otherwise undefined.  In other words, every keymap inherits bindings",
  614. "from some other keymap.  The keymap `universal' is at the root of the ",
  615. "inheritence tree.",
  616. #endif
  617.  
  618. DEFUN ("set-map-prompt", FDset_map_prompt, FAset_map_prompt, set_map_prompt)
  619. #ifdef FUNC_ARG_STRINGS
  620. "KSet prompt for keymap? ",
  621. "sPrompt for %1? ", 
  622. #endif
  623. #ifdef DOC_STRINGS
  624. "Set the prompt for KEYMAP to STRING.",
  625. "When KEYMAP is the current keymap, the prompt is displayed in the input",
  626. "area.",
  627. #endif
  628.  
  629.  
  630. DEFUN ("bind-key", FDbind_key, FAbind_key, bind_key)
  631. #ifdef FUNC_ARG_STRINGS
  632. "KKeymap? ",
  633. "SCommand? ",
  634. "cCharacter? ",
  635. #endif
  636. #ifdef DOC_STRINGS
  637. "In KEYMAP, make COMMAND the binding of KEY.",
  638. "COMMAND may be the name of an interactive function, the address of a macro,",
  639. "or the name of another keymap.",
  640. #endif
  641.  
  642. DEFUN ("bind-set", FDbind_set, FAbind_set, bind_set)
  643. #ifdef FUNC_ARG_STRINGS
  644. "KKeymap? ",
  645. "SCommand? ",
  646. "sCharacters? ",
  647. #endif
  648. #ifdef DOC_STRINGS
  649. "In KEYMAP, make COMMAND the binding of all chars in KEYSET.",
  650. "COMMAND may be the name of an interactive function, the address of a macro,",
  651. "or the name of another keymap.  Keyset should be two characters, separated",
  652. "by a `-', for example:",
  653. "    bind-set main begin-edit a-z",
  654. #endif
  655.  
  656. DEFUN ("bind-all-keys", FDbind_all_keys, FAbind_all_keys, bind_all_keys)
  657. #ifdef FUNC_ARG_STRINGS
  658. "KKeymap? ",
  659. "SCommand? ",
  660. #endif
  661. #ifdef DOC_STRINGS
  662. "In KEYMAP, bind every character to COMMAND.",
  663. "COMMAND may be the name of an interactive function, the address of a macro,",
  664. "or the name of another keymap.",
  665. #endif
  666.  
  667. DEFUN ("write-keys", FDwrite_keys_cmd, FAwrite_keys_cmd, write_keys_cmd)
  668. #ifdef FUNC_ARG_STRINGS
  669. "fwWrite bindings to file? ",
  670. #endif
  671. #ifdef DOC_STRINGS
  672. "Write a list of commands that recreate the current keybindings to FILE.",
  673. "This command is of limited utility and will probably go away or be",
  674. "changed considerably.  It is a way to generate a list of bindings, though.",
  675. #endif
  676.  
  677.  
  678.  
  679.  
  680. DEFUN ("write-variables",
  681.        FDwrite_variables, FAwrite_variables, write_variables)
  682. #ifdef FUNC_ARG_STRINGS
  683. "fwWrite variables to file? ", 
  684. #endif
  685. #ifdef DOC_STRINGS
  686. "Use variable names to construct a shell script to FILE.",
  687. "This command looks for all variables that are bound to a single",
  688. "cell (rather than to a range).  It writes a shell script that assigns",
  689. "the value of that cell to a shell variable.  For example, if the",
  690. "variable `w2_exemptions' is bound to cell R2C3, and that cell contains",
  691. "the value `2', then the output of write-variables will include a line:",
  692. "    w2_exemptions=2",
  693. "",
  694. "This command is of limited utility, but was implemented as part of a crude",
  695. "system of forms generation.",
  696. #endif
  697.  
  698. DEFUN ("read-variables", FDread_variables, FAread_variables, read_variables)
  699. #ifdef FUNC_ARG_STRINGS
  700. "frRead variables from file? ",
  701. #endif
  702. #ifdef DOC_STRINGS
  703. "Read cell values from a FILE.",
  704. "The syntax for the contents of FILE is <var>=<value>, e.g.:",
  705. "    w2_exemptions=2",    
  706. "For each assignment, if a variable with the given name is bound to a cell,",
  707. "the value is assigned to that cell.  See also, write-variables.",
  708. #endif
  709.  
  710.  
  711.  
  712. DEFUN ("read-commands", FDread_cmds_cmd, FAread_cmds_cmd, read_cmds_cmd)
  713. #ifdef FUNC_ARG_STRINGS
  714. "frRead commands from file? ",
  715. #endif
  716. #ifdef DOC_STRINGS
  717. "Read Oleo commands from FILE.",
  718. "The syntax for a command is a command name followed by a whitespace",
  719. "separated list arguments.  For example: ",
  720. "    bind-key main next-row ^n",
  721. "Blank lines and lines that begin with `#' are ignored.",
  722. "Lines may be continuted by preceeding the final newline with an",
  723. "odd number of `\\' characters.  One backslash and the newline will",
  724. "be discarded.",
  725. #endif
  726.  
  727.  
  728.  
  729. DEFUN_5 ("save-spreadsheet", FDwrite_cmd, FAwrite_cmd, DFwrite_cmd, write_cmd)
  730. #ifdef FUNC_ARG_STRINGS
  731. "fwSave spreadsheet? ",
  732. "=%0",
  733. #endif
  734. #ifdef FUNC_INIT_CODE
  735. "{insert-current-filename}",
  736. 0,
  737. #endif
  738. #ifdef DOC_STRINGS
  739. "Save the spreadsheet to FILENAME.",
  740. #endif
  741.  
  742. DEFUN ("toggle-load-hooks",
  743.        FDtoggle_load_hooks, FAtoggle_load_hooks, toggle_load_hooks)
  744. #ifdef FUNC_ARG_STRINGS
  745. "p?",
  746. #endif
  747. #ifdef DOC_STRINGS
  748. "Change whether load-hooks are run when spreadsheets are loaded.",
  749. "When active, the find-alternate-spreadsheet command looks for a variable",
  750. "called `load_hooks' and executes the macro at that address.",
  751. "With a positive prefix argument, turns load hooks on.  With a negative",
  752. "argument, turns them off.  With no argument, acts as a toggle.",
  753. #endif
  754.  
  755. DEFUN_5 ("find-alternate-spreadsheet",
  756.      FDread_cmd, FAread_cmd, DFread_cmd, read_cmd)
  757. #ifdef FUNC_ARG_STRINGS
  758. "frFind alternate spreadsheet? ",
  759. "MSpreadsheet modified;  kill anyway? (yes or no) ",
  760. "=%0",
  761. #endif
  762. #ifdef FUNC_INIT_CODE
  763. "{insert-current-filename}",
  764. 0,
  765. 0,
  766. #endif
  767. #ifdef DOC_STRINGS
  768. "Replace the currently loaded spreadsheet with the contents of FILE.",
  769. #endif
  770.  
  771. DEFUN ("merge-spreadsheet",
  772.        FDread_merge_cmd, FAread_merge_cmd, read_merge_cmd)
  773. #ifdef FUNC_ARG_STRINGS
  774. "frMerge spreadsheet? ",
  775. "MSpreadsheet modified; merge anyway? (yes or no) ",
  776. #endif
  777. #ifdef DOC_STRINGS
  778. "Combine the spreadsheet in FILE with the current spreadsheet.",
  779. "This reads a new spreadsheet without clearing all cells first.",
  780. #endif
  781.     
  782. DEFUN ("write-region-to-file",
  783.        FDwrite_reg_cmd, FAwrite_reg_cmd, write_reg_cmd)
  784. #ifdef FUNC_ARG_STRINGS
  785. "rWrite region? ",
  786. "fwWrite region to file? ",
  787. #endif
  788. #ifdef DOC_STRINGS
  789. "Write the cells in RANGE to FILE using the current file format.",
  790. "This command also writes all variables that with bindings entirely",
  791. "inside of RANGE.",
  792. #endif
  793.  
  794.  
  795.  
  796. DEFUN ("copy-region", FDcopy_region, FAcopy_region, copy_region)
  797. #ifdef FUNC_ARG_STRINGS
  798. "rCopy region? ",
  799. "RCopy %0 to? ",
  800. #endif
  801. #ifdef DOC_STRINGS
  802. "Copy the contents of SOURCE-RANGE to DEST-RANGE.",
  803. "DEST-RANGE must be either a single cell (the upper-left corner of the",
  804. "destination), or a range containing the same number of cells as the",
  805. "source range.",
  806. #endif
  807.     
  808. DEFUN ("copy-values-in-region",
  809.        FDcopy_values_region, FAcopy_values_region, copy_values_region)
  810. #ifdef FUNC_ARG_STRINGS
  811. "rCopy values in region? ",
  812. "RCopy values in %0 to:",
  813. #endif
  814. #ifdef DOC_STRINGS
  815. "Copy the values of the cells in SOURCE-RANGE to DEST-RANGE.",
  816. "DEST-RANGE must be either a single cell (the upper-left corner of the",
  817. "destination), or a range containing the same number of cells as the",
  818. "source range.",
  819. #endif
  820.     
  821. DEFUN ("move-region",
  822.        FDmove_region, FAmove_region, move_region)
  823. #ifdef FUNC_ARG_STRINGS
  824. "rMove region? ",
  825. "RMove region %0 to? ",
  826. #endif
  827. #ifdef DOC_STRINGS
  828. "Move the contents of SOURCE-RANGE to DEST-RANGE.",
  829. "DEST-RANGE must be either a single cell (the upper-left corner of the",
  830. "destination), or a range containing the same number of rows and columns",
  831. "as the source range.",
  832. "",
  833. "This command makes adjustments to all formulas in the range as well as to",
  834. "formulas and variable bindings that refer to the range.",
  835. #endif
  836.     
  837. DEFUN ("insert-row", FDinsert_row, FAinsert_row, insert_row)
  838. #ifdef FUNC_ARG_STRINGS
  839. "+p",
  840. #endif
  841. #ifdef DOC_STRINGS
  842. "Insert ARG empty rows.",
  843. #endif
  844.  
  845. DEFUN ("insert-col", FDinsert_col, FAinsert_col, insert_col)
  846. #ifdef FUNC_ARG_STRINGS
  847. "+p",
  848. #endif
  849. #ifdef DOC_STRINGS
  850. "Insert ARG empty cols.",
  851. #endif
  852.  
  853. DEFUN ("delete-row", FDdelete_row, FAdelete_row, delete_row)
  854. #ifdef FUNC_ARG_STRINGS
  855. "+p",
  856. #endif
  857. #ifdef DOC_STRINGS
  858. "Delete ARG rows.",
  859. #endif
  860.  
  861. DEFUN ("delete-col", FDdelete_col, FAdelete_col, delete_col)
  862. #ifdef FUNC_ARG_STRINGS
  863. "+p",
  864. #endif
  865. #ifdef DOC_STRINGS
  866. "Delete ARG cols.",
  867. #endif
  868.  
  869.  
  870.  
  871. /* Commands for editing cells. */
  872.  
  873. DEFUN ("edit-cell", FDedit_cell, FAedit_cell, edit_cell)
  874. #ifdef FUNC_ARG_STRINGS
  875. "$Set %c to? ", 
  876. #endif
  877. #ifdef DOC_STRINGS
  878. "Assign FORMULA to the current cell.",
  879. #endif
  880.  
  881. DEFUN ("auto-move-up", FDauto_move_up, FAauto_move_up,
  882.        set_auto_direction)
  883. #ifdef FUNC_ARG_STRINGS
  884. "#0",
  885. #endif
  886. #ifdef DOC_STRINGS
  887. "Set the auto-move direction to `up'.",
  888. "This is the direction that will be used by the next-edit command.",
  889. #endif
  890.  
  891.  
  892. DEFUN ("auto-move-down", FDauto_move_down, FAauto_move_down,
  893.        set_auto_direction)
  894. #ifdef FUNC_ARG_STRINGS
  895. "#1",
  896. #endif
  897. #ifdef DOC_STRINGS
  898. "Set the auto-move direction to `down'.",
  899. "This is the direction that will be used by the next-edit command.",
  900. #endif
  901.  
  902.  
  903. DEFUN ("auto-move-left", FDauto_move_left, FAauto_move_left,
  904.        set_auto_direction)
  905. #ifdef FUNC_ARG_STRINGS
  906. "#3",
  907. #endif
  908. #ifdef DOC_STRINGS
  909. "Set the auto-move direction to `left'.",
  910. "This is the direction that will be used by the next-edit command.",
  911. #endif
  912.  
  913.  
  914. DEFUN ("auto-move-right", FDauto_move_right, FAauto_move_right,
  915.        set_auto_direction)
  916. #ifdef FUNC_ARG_STRINGS
  917. "#2",
  918. #endif
  919. #ifdef DOC_STRINGS
  920. "Set the auto-move direction to `right'.",
  921. "This is the direction that will be used by the next-edit command.",
  922. #endif
  923.  
  924.  
  925. DEFUN ("auto-move-up-left", FDauto_move_up_left, FAauto_move_up_left,
  926.        set_auto_direction)
  927. #ifdef FUNC_ARG_STRINGS
  928. "#5",
  929. #endif
  930. #ifdef DOC_STRINGS
  931. "Set the auto-move direction to `up left'.",
  932. "This is the direction that will be used by the next-edit command.",
  933. #endif
  934.  
  935.  
  936. DEFUN ("auto-move-up-right", FDauto_move_up_right, FAauto_move_up_right,
  937.        set_auto_direction)
  938. #ifdef FUNC_ARG_STRINGS
  939. "#4",
  940. #endif
  941. #ifdef DOC_STRINGS
  942. "Set the auto-move direction to `up right'.",
  943. "This is the direction that will be used by the next-edit command.",
  944. #endif
  945.  
  946.  
  947. DEFUN ("auto-move-down-left", FDauto_move_down_left, FAauto_move_down_left,
  948.        set_auto_direction)
  949. #ifdef FUNC_ARG_STRINGS
  950. "#7",
  951. #endif
  952. #ifdef DOC_STRINGS
  953. "Set the auto-move direction to `down left'.",
  954. "This is the direction that will be used by the next-edit command.",
  955. #endif
  956.  
  957.  
  958. DEFUN ("auto-move-down-right", FDauto_move_down_right, FAauto_move_down_right,
  959.        set_auto_direction)
  960. #ifdef FUNC_ARG_STRINGS
  961. "#6",
  962. #endif
  963. #ifdef DOC_STRINGS
  964. "Set the auto-move direction to `down right'.",
  965. "This is the direction that will be used by the next-edit command.",
  966. #endif
  967.  
  968.  
  969. DEFUN ("auto-move-no-motion", FDauto_move_no_motion, FAauto_move_no_motion,
  970.        set_auto_direction)
  971. #ifdef FUNC_ARG_STRINGS
  972. "#8",
  973. #endif
  974. #ifdef DOC_STRINGS
  975. "Set the auto-move direction to `no motion'.",
  976. "This is the direction that will be used by the next-edit command.",
  977. #endif
  978.  
  979. DEFUN_3 ("auto-move", FDauto_move, auto_move)
  980. #ifdef DOC_STRINGS
  981. "Move one cell in the automatic motion direction.",
  982. "The automatic motion direction is set using one of the commands: ",
  983. "    [auto-move-up]  auto-move-up",
  984. "    [auto-move-down]  auto-move-down",
  985. "    [auto-move-left]  auto-move-left",
  986. "    [auto-move-right]  auto-move-right",
  987. "    [auto-move-up-left]  auto-move-up-left",
  988. "    [auto-move-up-right]  auto-move-up-right",
  989. "    [auto-move-down-left]  auto-move-down-left",
  990. "    [auto-move-down-right]  auto-move-down-right",
  991. #endif
  992.  
  993. DEFUN_3 ("auto-next-set", FDauto_next_set, auto_next_set)
  994. #ifdef DOC_STRINGS
  995. "Scan in the opposite direction of automatic motion, then move one cell.",
  996. "The direction of the one-cell motion is down for left or right",
  997. "automatic motion, and to the right otherwise.  See also, `auto-move'.",
  998. #endif
  999.  
  1000. DEFUN ("next-edit", FDnext_edit, FAnext_edit, run_string_as_macro)
  1001. #ifdef FUNC_ARG_STRINGS
  1002. "={exit-minibuffer}{auto-move}{edit-cell}",
  1003. #endif
  1004. #ifdef DOC_STRINGS
  1005. "Equivalent to: {exit-minibuffer}{auto-move}{edit-cell}",
  1006. "This command is used to terminate an edit-cell command, move to another",
  1007. "cell, and begin a second edit-cell command.  See also `auto-move'.",
  1008. #endif
  1009.  
  1010. DEFUN ("next-edit-set", FDnext_edit_set, FAnext_edit_set, run_string_as_macro)
  1011. #ifdef FUNC_ARG_STRINGS
  1012. "={exit-minibuffer}{auto-next-set}{edit-cell}",
  1013. #endif
  1014. #ifdef DOC_STRINGS
  1015. "Equivalent to: {exit-minibuffer}{auto-next-set}{edit-cell}",
  1016. "This command is used to terminate an edit-cell command, move to another",
  1017. "cell, and begin a second edit-cell command.  See also `auto-next-set'.",
  1018. #endif
  1019.  
  1020.  
  1021.  
  1022. DEFUN ("goto-edit-cell",
  1023.        FDgoto_edit_cell, FAgoto_edit_cell, goto_edit_cell)
  1024. #ifdef FUNC_ARG_STRINGS
  1025. "l",
  1026. #endif
  1027. #ifdef DOC_STRINGS
  1028. "Begin to edit the current cell's formula.",
  1029. "The last character used to invoke this command is reexecuted as a",
  1030. "formula editing command.",
  1031. #endif
  1032.  
  1033. DEFUN ("set-region-formula",
  1034.        FDset_region_formula, FAset_region_formula, set_region_formula)
  1035. #ifdef FUNC_ARG_STRINGS
  1036. "rSet region? ",
  1037. "$Set region %0 to? ",
  1038. #endif
  1039. #ifdef DOC_STRINGS
  1040. "Change the definition of all cells in RANGE to FORMULA.",
  1041. #endif
  1042.  
  1043.     
  1044.  
  1045.  
  1046. DEFUN_3 ("delete-cell", FDdelete_cell, kill_cell_cmd)
  1047. #ifdef DOC_STRINGS
  1048. "Erase the formula, font and format of the current cell.",
  1049. #endif
  1050.  
  1051. DEFUN ("delete-region", FDdelete_region, FAdelete_region, delete_region)
  1052. #ifdef FUNC_ARG_STRINGS
  1053. "rDelete region? ",
  1054. #endif
  1055. #ifdef DOC_STRINGS
  1056. "Erase the formulas, fonts and formats of the cells in RANGE.",
  1057. #endif
  1058.  
  1059. DEFUN ("clear-spreadsheet",
  1060.        FDclear_spreadsheet, FAclear_spreadsheet, kill_all_cmd) 
  1061. #ifdef FUNC_ARG_STRINGS
  1062. "MSpreadsheet modified;  clear anyway? (yes or no) ",
  1063. #endif
  1064. #ifdef DOC_STRINGS
  1065. "Erase all cells, reset all column widths and row heights.",
  1066. #endif
  1067.  
  1068.  
  1069.  
  1070. DEFUN ("print-region", FDprint_region, FAprint_region, print_region)
  1071. #ifdef FUNC_ARG_STRINGS
  1072. "rRegion? ",
  1073. "fwPrint to file? ",
  1074. #endif
  1075. #ifdef DOC_STRINGS
  1076. "Print (in ascii) the contents of REGION to FILE.",
  1077. #endif
  1078.  
  1079. DEFUN ("psprint-region",
  1080.        FDpsprint_region, FApsprint_region, psprint_region_cmd)
  1081. #ifdef FUNC_ARG_STRINGS
  1082. "rPrint region? ",
  1083. "fwWrite EPS to file? ",
  1084. #endif
  1085. #ifdef DOC_STRINGS
  1086. "Print the contents of REGION (in PostScript) to FILE.",
  1087. #endif
  1088.  
  1089. DEFUN ("set-page-size", FDset_page_size, FAset_page_size, set_page_size_cmd)
  1090. #ifdef FUNC_ARG_STRINGS
  1091. "sSet page size? ",
  1092. #endif
  1093. #ifdef DOC_STRINGS
  1094. "Use PAGESIZE when printing PostScript.",
  1095. "PAGESIZE may take the following forms:",
  1096. "    8.5x11        -- a page size in inches.",
  1097. "    22x28c        -- a page size in centimeters",
  1098. "    612x792p    -- a page size in points",
  1099. "or any of number of symbolic names? ",
  1100. "    letter        -- 8.5 x 11 in.",
  1101. "    landscape    -- 11 x 8.5 in.",
  1102. "    etc.",
  1103. "To see a complete list of availble names, see the Oleo source file",
  1104. "`print.c'.",
  1105. #endif
  1106.  
  1107. DEFUN ("set-default-ps-font",
  1108.        FDset_ps_font_cmd, FAset_ps_font_cmd, set_ps_font_cmd)
  1109. #ifdef FUNC_ARG_STRINGS
  1110. "sSet default postscript font? ",
  1111. #endif
  1112. #ifdef DOC_STRINGS
  1113. "Make FONT the default postscript font.",
  1114. "FONT should be a valid postscript font name (e.g. TimesRoman). That font",
  1115. "will be used to print all cells with no explicitly defined font.",
  1116. #endif
  1117.     
  1118.  
  1119.  
  1120. DEFUN ("set-default-x-font",
  1121.        FDset_default__x_font, FAset_default_x_font, set_x_default_font)
  1122. #ifdef FUNC_ARG_STRINGS
  1123. "sSet default X11 font? ",
  1124. #endif
  1125. #ifdef DOC_STRINGS
  1126. "Make FONT the default X11 font.",
  1127. "FONT should be a valid X11 font name, with the point size wildcarded.",
  1128. "For example: ",
  1129. "        *times-medium-r-*",
  1130. "",
  1131. "This will be used to display all cells with no explicitly defined font.",
  1132. #endif
  1133.  
  1134. #ifdef HAVE_X11_X_H
  1135. DEFUN ("set-default-point-size", FDset_x_default_point_size,
  1136.        FAset_x_default_point_size, set_x_default_point_size)
  1137. #ifdef FUNC_ARG_STRINGS
  1138. "NSet default point size? ",
  1139. #endif
  1140. #ifdef DOC_STRINGS
  1141. "Set the default point size of cell text under X11 to ARG.",
  1142. "Presuming that properly wildcarded font names have been used",
  1143. "This causes all other fonts to be scaled accordingly.",
  1144. #endif
  1145.  
  1146. #endif
  1147.  
  1148. DEFUN ("define-font", FDdefine_font, FAdefine_font, define_font)
  1149. #ifdef FUNC_ARG_STRINGS
  1150. "wDefine font name? ",
  1151. "wX11 name for %0? ",
  1152. "wPostscript name for %0? ",
  1153. #endif
  1154. #ifdef DOC_STRINGS
  1155. "Define the font OLEONAME to correspond to X11NAME and POSTSCRIPTNAME.",
  1156. "",
  1157. "The Oleo name of a font is used with commands like set-region-font.",
  1158. "It should be easy to type and to remember, for example: ",
  1159. "",
  1160. "        times",
  1161. "",
  1162. "To achieve the best results, the X11 font name should leave the",
  1163. "pointsize wild-carded.  For example: ",
  1164. "",
  1165. "        *times-medium-r-*",
  1166. "",
  1167. "The postscript name should be a font name acceptable to your printer.",
  1168. "For example:",
  1169. "",
  1170. "        TimesRoman",
  1171. "",
  1172. #endif
  1173.  
  1174.  
  1175.  
  1176.  
  1177. DEFUN ("set-x-default-font",
  1178.        FDset_x_def_font, FAset_x_def_font, set_x_default_font)
  1179. #ifdef FUNC_ARG_STRINGS
  1180. "sX11 font specification? ",
  1181. #endif
  1182. #ifdef DOC_STRINGS
  1183. "Set the X11 name of the default font.",
  1184. "The name should be a valid X11 font name, preferably with the point",
  1185. "size wild-carded, for example:",
  1186. "",
  1187. "        *times-medium-r-*",
  1188. #endif
  1189.  
  1190.  
  1191. DEFUN_5 ("set-cell-font", FDset_cell_font, FAset_cell_font,
  1192.      DFset_cell_font, set_region_font)
  1193. #ifdef FUNC_ARG_STRINGS
  1194. ".'",
  1195. "sSet %0 font to? ",
  1196. "dScale? (ratio to the default point size e.g. 1.3) ",
  1197. #endif
  1198. #ifdef FUNC_INIT_CODE
  1199. 0,
  1200. "{insert-cell-attr %0 font}",
  1201. "{insert-cell-attr %0 font-scale}",
  1202. #endif
  1203. #ifdef DOC_STRINGS
  1204. "Set the current cell's font to NAME at SCALE",
  1205. "NAME should be a name defined with [define-font].",
  1206. "SCALE should be a floating point number, which will be interpreted",
  1207. "as a ratio to the default point size.  For example, if SCALE is 1.33",
  1208. "and the default point size is 12 then this cell will be drawn with",
  1209. "a point size of 16.",
  1210. "",
  1211. "Under X, this scaling behavior depends on having a wide variety of fonts",
  1212. "installed, and wildcarding point-sizes in x11 font names passed to ",
  1213. "define-font.",
  1214. #endif
  1215.  
  1216. DEFUN_5 ("set-region-font", FDset_region_font, FAset_region_font,
  1217.      DFset_region_font, set_region_font)
  1218. #ifdef FUNC_ARG_STRINGS
  1219. "rSet font for what region? ",
  1220. "sSet %0 font to? ",
  1221. "dPoint size? ",
  1222. #endif
  1223. #ifdef FUNC_INIT_CODE
  1224. 0,
  1225. "{insert-cell-attr %0 font}",
  1226. "{insert-cell-attr %0 font-scale}",
  1227. #endif
  1228. #ifdef DOC_STRINGS
  1229. "Set the font of cells in REGION to NAME at SCALE",
  1230. "NAME should be a name defined with [define-font].",
  1231. "SCALE should be a floating point number, which will be interpreted",
  1232. "as a ratio to the default point size.  For example, if SCALE is 1.33",
  1233. "and the default point size is 12 then this cell will be drawn with",
  1234. "a point size of 16.",
  1235. "",
  1236. "Under X, this scaling behavior depends on having a wide variety of fonts",
  1237. "installed, and wildcarding point-sizes in x11 font names passed to ",
  1238. "define-font.",
  1239. #endif
  1240.  
  1241.  
  1242.  
  1243.  
  1244. DEFUN_3 ("recompile_spreadsheet",
  1245.      FDrecompile_spreadsheet, recompile_spreadsheet)
  1246. #ifdef DOC_STRINGS
  1247. "Recompile alll cell formulas.",
  1248. #endif
  1249.  
  1250. DEFUN_3 ("recenter-window", FDrecenter_window, recenter_window)
  1251. #ifdef DOC_STRINGS
  1252. "Center the cell cursor in the current window.",
  1253. #endif
  1254.  
  1255. /* Window commands (basic.h) */
  1256. DEFUN ("open-window", FDopen_window, FAopen_window, open_window)
  1257. #ifdef FUNC_ARG_STRINGS
  1258. "sSplit command? ",
  1259. #endif
  1260. #ifdef DOC_STRINGS
  1261. "Split the window according to SPLIT.",
  1262. "The syntax of split is an orientation (`h' or `v') followed by",
  1263. "either a number of rows (cols) or a percentege of rows (cols).",
  1264. "For example: ",
  1265. "    h10",
  1266. "    v33%",
  1267. #endif
  1268.  
  1269. DEFUN_3 ("split-window-horizontally", FDhsplit_window, hsplit_window)
  1270. #ifdef DOC_STRINGS
  1271. "Divide the current window evenly into two windows side by side.",
  1272. #endif
  1273.  
  1274. DEFUN_3 ("split-window-vertically", FDvsplit_window, vsplit_window)
  1275. #ifdef DOC_STRINGS
  1276. "Divide the current window evenly into two stacked windows.",
  1277. #endif
  1278.     
  1279. DEFUN_3 ("delete-window", FDdelete_window, delete_window)
  1280. #ifdef DOC_STRINGS
  1281. "Remove the current window from the display.",
  1282. #endif
  1283.  
  1284. DEFUN_3 ("delete-other-windows", FDdelete_other_windows, delete_other_windows)
  1285. #ifdef DOC_STRINGS
  1286. "Remove all but the current window from the display.",
  1287. #endif
  1288.  
  1289. DEFUN ("close-window", FDclose_window, FAclose_window, close_window)
  1290. #ifdef FUNC_ARG_STRINGS
  1291. "NClose window number? ",
  1292. #endif
  1293. #ifdef DOC_STRINGS
  1294. "Remove the window ARG from the display.",
  1295. #endif
  1296.     
  1297. DEFUN ("goto-window", FDgoto_window, FAgoto_window, goto_window)
  1298. #ifdef FUNC_ARG_STRINGS
  1299. "NGoto window number? ",
  1300. #endif
  1301. #ifdef DOC_STRINGS
  1302. "Make the ARGth window the current window.",
  1303. #endif
  1304.     
  1305. DEFUN_3 ("goto-minibuffer", FDgoto_minibuffer, goto_minibuffer)
  1306. #ifdef DOC_STRINGS
  1307. "Select the input area as the current window.",
  1308. "An error is given if the input area is not active.",
  1309. #endif
  1310.  
  1311. DEFUN_3 ("other-window", FDother_window, other_window)
  1312. #ifdef FUNC_ARG_STRINGS
  1313. "+p",
  1314. #endif
  1315. #ifdef DOC_STRINGS
  1316. "Select the ARGth different window.",
  1317. #endif
  1318.  
  1319.  
  1320.  
  1321. DEFUN ("toggle-overwrite", FDtoggle_overwrite, FAtoggle_overwrite, toggle_overwrite)
  1322. #ifdef FUNC_ARG_STRINGS
  1323. "p?",
  1324. "p",
  1325. #endif
  1326. #ifdef DOC_STRINGS
  1327. "Toggle between insert and overwrite mode.",
  1328. "This command only applies when an argument is being edited.",
  1329. "",
  1330. "With a positive (non-0) prefix argument, turn overwrite mode on.",
  1331. "With a negative or 0 prefix argument, turn overwrite mode off.",
  1332. "With no prefix argument, toggle overwrite mode.",
  1333. #endif
  1334.  
  1335.  
  1336. DEFUN_3 ("beginning-of-line", FDbeginning_of_line, beginning_of_line)
  1337. #ifdef DOC_STRINGS
  1338. "Move point to beginning of input line.",
  1339. #endif
  1340.  
  1341. DEFUN_3 ("end-of-line", FDend_of_line, end_of_line)
  1342. #ifdef DOC_STRINGS
  1343. "Move point to end of input line.",
  1344. #endif
  1345.  
  1346. DEFUN ("backward-char", FDbackward_char, FAbackward_char, backward_char)
  1347. #ifdef FUNC_ARG_STRINGS
  1348. "p",
  1349. #endif
  1350. #ifdef DOC_STRINGS
  1351. "Move point left ARG characters (right if ARG negative).",
  1352. "On attempt to pass beginning or end of buffer, report an error.",
  1353. #endif
  1354.  
  1355. DEFUN ("backward-word", FDbackward_word, FAbackward_word, backward_word)
  1356. #ifdef FUNC_ARG_STRINGS
  1357. "p",
  1358. #endif
  1359. #ifdef DOC_STRINGS
  1360. "Move backward in the input area until encountering the end of a word.",
  1361. "With argument, do this that many times.",
  1362. #endif
  1363.  
  1364.  
  1365. DEFUN ("backward-delete-char", FDbackward_delete_char, FAbackward_delete_char, backward_delete_char)
  1366. #ifdef FUNC_ARG_STRINGS
  1367. "p",
  1368. #endif
  1369. #ifdef DOC_STRINGS
  1370. "Delete ARG characters backward.",
  1371. #endif
  1372.  
  1373. DEFUN ("backward-delete-word", FDbackward_delete_word, FAbackward_delete_word, backward_delete_word)
  1374. #ifdef FUNC_ARG_STRINGS
  1375. "p",
  1376. #endif
  1377. #ifdef DOC_STRINGS
  1378. "Kill characters backward until encountering the end of a word.",
  1379. "With prefix argument, do this that many times.",
  1380. #endif
  1381.  
  1382. DEFUN_3 ("delete-to-start", FDdelete_to_start, delete_to_start)
  1383. #ifdef DOC_STRINGS
  1384. "Delete the input line, upto the cursor position.",
  1385. #endif
  1386.  
  1387. DEFUN ("forward-char", FDforward_char, FAforward_char, forward_char)
  1388. #ifdef FUNC_ARG_STRINGS
  1389. "p",
  1390. #endif
  1391. #ifdef DOC_STRINGS
  1392. "Move the input area cursor right ARG characters (left if ARG negative).",
  1393. "On reaching end of buffer, report an error.",
  1394. #endif
  1395.  
  1396. DEFUN ("forward-word", FDforward_word, FAforward_word, forward_word)
  1397. #ifdef FUNC_ARG_STRINGS
  1398. "p",
  1399. #endif
  1400. #ifdef DOC_STRINGS
  1401. "Move the input area cursor forward ARG words (backward if ARG is negative).",
  1402. #endif
  1403.  
  1404. DEFUN ("delete-char", FDdelete_char, FAdelete_char, delete_char)
  1405. #ifdef FUNC_ARG_STRINGS
  1406. "p",
  1407. #endif
  1408. #ifdef DOC_STRINGS
  1409. "Delete ARG following characters in the input area.",
  1410. "Deletes backwards with negative arg.",
  1411. #endif
  1412.  
  1413. DEFUN ("delete-word", FDdelete_word, FAdelete_word, delete_word)
  1414. #ifdef FUNC_ARG_STRINGS
  1415. "p",
  1416. #endif
  1417. #ifdef DOC_STRINGS
  1418. "Kill characters forward until encountering the end of a word.",
  1419. "With argument, do this that many times.",
  1420. #endif
  1421.  
  1422.  
  1423. DEFUN_3 ("kill-line", FDkill_line, kill_line)
  1424. #ifdef DOC_STRINGS
  1425. "Delete the rest of the input line, beginning at the cursor position.",
  1426. #endif
  1427.  
  1428. DEFUN_3 ("insert-cell-expression",
  1429.          FDinsert_cell_expression, insert_cell_expression)
  1430. #ifdef DOC_STRINGS
  1431. "Insert the current cell's formula in the input area.",
  1432. #endif
  1433.  
  1434.  
  1435. DEFUN_3 ("insert-cell-value", FDinsert_cell_value, insert_cell_value)
  1436. #ifdef DOC_STRINGS
  1437. "Insert the current cell's value (not it's formula) in the input area.",
  1438. #endif
  1439.  
  1440. DEFUN_3 ("insert-rel-ref", FDinsert_rel_ref, insert_rel_ref)
  1441. #ifdef DOC_STRINGS
  1442. "Insert a relative reference in the input area.",
  1443. "This command can only be executed when a cell formula is being edited.",
  1444. "The inserted references is to the current cell, and is relative to the",
  1445. "cell being defined.",
  1446. #endif
  1447.  
  1448.  
  1449. DEFUN_3 ("insert-abs-ref", FDinsert_abs_ref, insert_abs_ref)
  1450. #ifdef DOC_STRINGS
  1451. "Insert an absolute reference to the current cell in the input area.",
  1452. #endif
  1453.  
  1454. DEFUN ("insert-cell-attr",
  1455.        FDinsert_cell_attr, FAinsert_cell_attr, insert_cell_attr)
  1456. #ifdef FUNC_ARG_STRINGS
  1457. "RInsert attribute of cell? ",
  1458. "SInsert %0 attribute? ", 
  1459. #endif
  1460. #ifdef DOC_STRINGS
  1461. "(Internal use -- probably not useful as a command.)",
  1462. "For the lr,lc cell in RNG, insert the name of its named ATTRIBUTE.",
  1463. "Supported ATTRIBUTEs are `width', `height', `font', `font-scale' and",
  1464. "`format'.",
  1465. #endif
  1466.  
  1467. DEFUN_3 ("insert-current-filename",
  1468.      FDinsert_current_filename, insert_current_filename)
  1469. #ifdef DOC_STRINGS
  1470. "Insert the name of the current file (if any) in the input area.",
  1471. #endif
  1472.  
  1473. DEFUN_3 ("insert-context-word", FDinsert_context_word, insert_context_word)
  1474. #ifdef DOC_STRINGS
  1475. "(internal use)",
  1476. #endif
  1477.  
  1478. DEFUN ("insert-user-format-part",
  1479.        FDinsert_usr_fmt_part, FAinsert_usr_fmt_part, insert_usr_fmt_part)
  1480. #ifdef FUNC_ARG_STRINGS
  1481. "nInsert part of user format [1-16]? ",
  1482. "nInsert which part of user format %0 [1-9]? ",
  1483. #endif
  1484. #ifdef DOC_STRINGS
  1485. "(Internal use -- probably not useful as a command.)",
  1486. "For user format FMT, insert the Nth field.",
  1487. "The fields of a user format are numbered this way:",
  1488. "  1 - positive header",
  1489. "  2 - negative header",
  1490. "  3 - positive trailer",
  1491. "  4 - negative trailer",
  1492. "  5 - representation of zero",
  1493. "  6 - comma (as in 1,000,000.00)",
  1494. "  7 - decimal point",
  1495. "  8 - precision", 
  1496. "  9 - scale factor",
  1497. "",
  1498. "For more formation, see documentation for the comand define-user-format.",
  1499. #endif
  1500.  
  1501.  
  1502. DEFUN ("self-insert-command",
  1503.        FDself_insert_command, FAself_insert_command, self_insert_command)
  1504. #ifdef FUNC_ARG_STRINGS
  1505. "l",
  1506. "p",
  1507. #endif
  1508. #ifdef DOC_STRINGS
  1509. "Insert the last-typed character in the input area.",
  1510. "Prefix arg is a repeat-count.",
  1511. #endif
  1512.  
  1513. DEFUN ("self-map-command",
  1514.        FDself_map_command, FAself_map_command, self_map_command)
  1515. #ifdef FUNC_ARG_STRINGS
  1516. "l",
  1517. #endif
  1518. #ifdef DOC_STRINGS
  1519. "Map the last-typed character in the keysequence argument being edited.",
  1520. "This is used by the help system to prompt for the argument to describe-key and",
  1521. "describe-key-briefly.",
  1522. #endif
  1523.  
  1524. DEFUN ("exit-self-inserting",
  1525.        FDexit_self_inserting, FAexit_self_inserting, exit_self_inserting)
  1526. #ifdef FUNC_ARG_STRINGS
  1527. "l",
  1528. #endif
  1529. #ifdef DOC_STRINGS
  1530. "Insert the name of the last character typed and exit the minibuffer.",
  1531. "This is used to implement commands which prompt the user for a character.",
  1532. #endif
  1533.  
  1534.  
  1535.  
  1536. DEFUN ("pushback-keystroke",
  1537.        FApushback_keystroke, FDpushback_keystroke, pushback_keystroke)
  1538. #ifdef FUNC_ARG_STRINGS
  1539. "c'(any key continues) ",
  1540. #endif
  1541. #ifdef DOC_STRINGS
  1542. "(Internal use -- probably not useful as a command.)",
  1543. "Push the last keystroke back onto the input stream.",
  1544. #endif
  1545.  
  1546.  
  1547.  
  1548.  
  1549. DEFUN ("display-error-msg",
  1550.        FDdisplay_error_msg, FAdisplay_error_msg, display_error_msg)
  1551. #ifdef FUNC_ARG_STRINGS
  1552. "sMessage? ",
  1553. "c'%0",
  1554. #endif
  1555. #ifdef DOC_STRINGS
  1556. "Display an error message for the user.",
  1557. "The message vanishes as soon as the user types the next character of input",
  1558. "of after a brief timeout.",
  1559. #endif
  1560.  
  1561.  
  1562.  
  1563. /* Functions related to setting cell attributes. */
  1564. DEFUN_5 ("set-region-height", FDset_region_height, FAset_region_height,
  1565.      DFset_region_height, set_region_height)
  1566. #ifdef FUNC_ARG_STRINGS
  1567. "rSet height for region? ",
  1568. "sSet height for %0 to? ",
  1569. #endif
  1570. #ifdef FUNC_INIT_CODE
  1571. 0,
  1572. "{insert-cell-attr %0 height}",
  1573. #endif
  1574. #ifdef DOC_STRINGS
  1575. "Set the height for rows in RANGE to HEIGHT.",
  1576. "HEIGHT may be a non-negative integer or `default', in which case the value",
  1577. "set with [set-default-height] is used.",
  1578. "",
  1579. "On the screen, a cell of height N is as tall as N lines of text in the",
  1580. "default cell font.",
  1581. #endif
  1582.  
  1583. DEFUN_5 ("set-region-width", FDset_region_width, FAset_region_width,
  1584.      DFset_region_width, set_region_width)
  1585. #ifdef FUNC_ARG_STRINGS
  1586. "rSet width for region? ",
  1587. "sSet width for %0 to? ",
  1588. #endif
  1589. #ifdef FUNC_INIT_CODE
  1590. 0,
  1591. "{insert-cell-attr %0 width}",
  1592. #endif
  1593. #ifdef DOC_STRINGS
  1594. "Set the width of columns in RANGE to WIDTH.",
  1595. "WIDTH may be a non-negative integer or `default', in which case the value",
  1596. "set with [set-default-width] is used.",
  1597. "",
  1598. "On the screen, a cell of width N is as wide as N repitions of the character",
  1599. "`M' in the default cell font.",
  1600. #endif
  1601.  
  1602.  
  1603. DEFUN ("set-region-protection", FDset_region_protection,
  1604.        FAset_region_protection, set_region_protection)
  1605. #ifdef FUNC_ARG_STRINGS
  1606. "rSet protection for region? ",
  1607. "[dpu][D]efault  [P]rotect  [U]nprotect? ",
  1608. #endif
  1609. #ifdef DOC_STRINGS
  1610. "Set the protection for cells in a REGION to PROT.",
  1611. "PROT may be `d' for default, `p' - protected, or `u' - unprotected.",
  1612. #endif
  1613.  
  1614.  
  1615. DEFUN ("set-region-alignment", FDset_region_alignment,
  1616.        FAset_region_alignment, set_region_alignment)
  1617. #ifdef FUNC_ARG_STRINGS
  1618. "rSet alignment for region? ",
  1619. "[dlcr][D]efault  [L]eft  [C]enter  [R]ight? ",
  1620. #endif
  1621. #ifdef DOC_STRINGS
  1622. "Set the alignment for cells in a REGION to JST.",
  1623. "JST may be `d' for default, `l' - left, `r' - right, or `c' - center.",
  1624. #endif
  1625.  
  1626.  
  1627. DEFUN_5 ("set-region-format", FDset_region_format, FAset_region_format,
  1628.      DFset_region_format, set_region_format)
  1629. #ifdef FUNC_ARG_STRINGS
  1630. "rSet format for region? ",
  1631. "FSet format of %0 to? ",
  1632. #endif
  1633. #ifdef FUNC_INIT_CODE
  1634. 0,
  1635. "{insert-cell-attr %0 format}",
  1636. #endif
  1637. #ifdef DOC_STRINGS
  1638. "Set the format for cells in REGION to FORMAT.",
  1639. "Oleo can display numbers in these formats:",
  1640. "",
  1641. "integer        The number is rounded to an integer before being displayed.",
  1642. "",
  1643. "float        The number is displayed in decimal notation, using",
  1644. "        whatever precision is needed (or fits).",
  1645. "",
  1646. "hidden        The number is not displayed.  This has no other effect on",
  1647. "        the cell (e.g. it is recalculated normally).",
  1648. "",
  1649. "",
  1650. "graph        The number is displayed as a small graph.  If the number is",
  1651. "        close to zero, it will be displayed as '0', If it is positive,",
  1652. "        a row of '+'-es is displayed.  If it is negative, a row of",
  1653. "        '-'-es is displayed.",
  1654. "",
  1655. "user-1 through    These are the sixteen user-defined formats.  ",
  1656. "user-16        c.f. set-user-format.",
  1657. "",
  1658. "The following formats require a precision.  The precision may be a number",
  1659. "from zero to 14, in which case that number of digits will always be displayed",
  1660. "after the decimal point (zero-padding or rounding the number as needed), or",
  1661. "the precision may be 'float', in which case oleo will use as many digits as",
  1662. "necessary.  As examples:",
  1663. "",
  1664. "    dollar.2            display like ``$1,769.00''",
  1665. "    general.float                \"    \"    ``1769.00032''    ",
  1666. "",
  1667. "general        This uses either normal or scientific notation, depending on",
  1668. "        the magnitude of the number and the width of the column.",
  1669. "",
  1670. "dollar        Positive values are preceeded by '$', (so 3 is displayed as",
  1671. "        '$3').  Negative values are parenthasized (so -3 is displayed",
  1672. "        as '($3)'), and all large values have a ',' every three",
  1673. "        digits (so 1000 is displayed as '$1,000'.",
  1674. "",
  1675. "comma        Positive numbers are not preceede by '$', but this is",
  1676. "        otherwise identical to 'dollar'.",
  1677. "",
  1678. "percent        The value is multiplied by 100, and is displayed with a",
  1679. "        trailing '%'.  Thus .01 displays as '1%', while 1 displays as",
  1680. "        '100%'.",
  1681. "",
  1682. "fixed        The number is displayed in normal, everyday notation, using",
  1683. "        the precision specified.  'fixed.float' is the same as",
  1684. "        'float'.  'fixed.0' is the same as 'integer'.",
  1685. "",
  1686. "exponent    The number is displayed in scientific notation.",
  1687. "",
  1688. #endif
  1689.  
  1690.  
  1691. DEFUN_5 ("set-cell-height", FDset_cell_height, FAset_cell_height,
  1692.      DFset_cell_height, set_region_height)
  1693. #ifdef FUNC_ARG_STRINGS
  1694. ".'",
  1695. "sSet height for %0 to? ",
  1696. #endif
  1697. #ifdef FUNC_INIT_CODE
  1698. 0,
  1699. "{insert-cell-attr %0 height}",
  1700. #endif
  1701. #ifdef DOC_STRINGS
  1702. "Set the height for ROW to HEIGHT.",
  1703. "HEIGHT may be a non-negative integer or `default', in which case the value",
  1704. "set with [set-default-height] is used.",
  1705. "",
  1706. "On the screen, a cell of height N is as tall as N lines of text in the",
  1707. "default cell font.",
  1708. #endif
  1709.  
  1710. DEFUN_5 ("set-cell-width", FDset_cell_width, FAset_cell_width,
  1711.      DFset_cell_width, set_region_width)
  1712. #ifdef FUNC_ARG_STRINGS
  1713. ".'",
  1714. "sSet width for %0 to? ",
  1715. #endif
  1716. #ifdef FUNC_INIT_CODE
  1717. 0,
  1718. "{insert-cell-attr %0 width}",
  1719. #endif
  1720. #ifdef DOC_STRINGS
  1721. "Set the width for COL to WIDTH.",
  1722. "WIDTH may be a non-negative integer or `default', in which case the value",
  1723. "set with [set-default-width] is used.",
  1724. "",
  1725. "On the screen, a cell of width N is as wide as N repitions of `M' in the",
  1726. "default cell font.",
  1727. #endif
  1728.  
  1729. DEFUN ("set-cell-protection",
  1730.        FDset_cell_protection, FAset_cell_protection, set_region_protection)
  1731. #ifdef FUNC_ARG_STRINGS
  1732. ".'",
  1733. "[dpu][D]efault  [P]rotect  [U]nprotect? ",
  1734. #endif
  1735. #ifdef DOC_STRINGS
  1736. "Set the protection for CELL to PROT.",
  1737. "PROT may be `d' for default, `p' - protected, or `u' - unprotected.",
  1738. #endif
  1739.  
  1740. DEFUN ("set-cell-alignment",
  1741.        FDset_cell_alignment, FAset_cell_alignment, set_region_alignment)
  1742. #ifdef FUNC_ARG_STRINGS
  1743. ".'",
  1744. "[dlcr][D]efault  [L]eft  [C]enter  [R]ight? ",
  1745. #endif
  1746. #ifdef DOC_STRINGS
  1747. "Set the alignment for CELL to JST.",
  1748. "JST may be `d' for default, `l' - left, `r' - right, or `c' - center.",
  1749. #endif
  1750.  
  1751. DEFUN_5 ("set-cell-format", FDset_cell_format, FAset_cell_format,
  1752.      DFset_cell_format, set_region_format)
  1753. #ifdef FUNC_ARG_STRINGS
  1754. ".'",
  1755. "FSet format of %0 to? ",
  1756. #endif
  1757. #ifdef FUNC_INIT_CODE
  1758. 0,
  1759. "{insert-cell-attr %0 format}",
  1760. #endif
  1761. #ifdef DOC_STRINGS
  1762. "Set the format for numeric display for CELL to FORMAT.",
  1763. "For a description of valid formats, see set-region-format.",
  1764. #endif
  1765.  
  1766.  
  1767. /* Defaults....*/
  1768.  
  1769. DEFUN ("set-default-height",
  1770.        FDset_def_height, FAset_def_height, set_def_height)
  1771. #ifdef FUNC_ARG_STRINGS
  1772. "sDefault height? ",
  1773. #endif
  1774. #ifdef DOC_STRINGS
  1775. "Set the default height of rows.",
  1776. "See set-region-height for more information.",
  1777. #endif
  1778.  
  1779.  
  1780. DEFUN ("set-default-width",
  1781.        FDset_def_width, FAset_def_width, set_def_width)
  1782. #ifdef FUNC_ARG_STRINGS
  1783. "sDefault width? ",
  1784. #endif
  1785. #ifdef DOC_STRINGS
  1786. "Set the default height of cols.",
  1787. "See set-region-width for more information.",
  1788. #endif
  1789.  
  1790. DEFUN ("set-user-scales",
  1791.        FDset_user_scales, FAset_user_scales, set_user_scales) 
  1792. #ifdef FUNC_ARG_STRINGS
  1793. "dScale row hights by? ",
  1794. "dScale column widths by? ",
  1795. #endif
  1796. #ifdef DOC_STRINGS
  1797. "Scale HEIGHT and WIDTH by the given floating point amounts.",
  1798. #endif
  1799.  
  1800.  
  1801. DEFUN ("set-default-protection", FDset_def_protection,
  1802.        FAset_def_protection, set_def_protection)
  1803. #ifdef FUNC_ARG_STRINGS
  1804. "[pu][U]nprotected  or  [P]rotected",
  1805. #endif
  1806. #ifdef DOC_STRINGS
  1807. "Set the default protection of cells.",
  1808. "A protection may be specified as `p' for protected, or `u' -- unprotected.",
  1809. #endif
  1810.  
  1811.  
  1812. DEFUN ("set-default-alignment",
  1813.        FDset_def_alignment, FAset_def_alignment, set_def_alignment)
  1814. #ifdef FUNC_ARG_STRINGS
  1815. "[dlcrDLCR][L]eft  [C]enter  [R]ight  [D]efault",
  1816. #endif
  1817. #ifdef DOC_STRINGS
  1818. "Set the default alignment of cells.",
  1819. "An allignment may be specified as `l' for left, `c' -- center, `r' -- right",
  1820. "or `d' -- default.",
  1821. #endif
  1822.  
  1823. DEFUN ("set-default-format",
  1824.        FDset_def_format, FAset_def_format, set_def_format)
  1825. #ifdef FUNC_ARG_STRINGS
  1826. "FDefault format? ",
  1827. #endif
  1828. #ifdef DOC_STRINGS
  1829. "Set the default format for numeric display to FORMAT.",
  1830. "See set-region-format for an explanation of formats.",
  1831. #endif
  1832.  
  1833. DEFUN ("set-default-font",
  1834.        FDset_default_font, FAset_default_font, set_default_font)
  1835. #ifdef FUNC_ARG_STRINGS
  1836. "sSet default font to? ",
  1837. "dPoint size? (e.g. 1.3) ",
  1838. #endif
  1839. #ifdef DOC_STRINGS
  1840. "Set the default font to NAME at SCALE",
  1841. "NAME should be a name defined with [define-font].",
  1842. "SCALE should be a floating point number, which will be interpreted",
  1843. "as a ratio to the default point size.  For example, if SCALE is 1.33",
  1844. "and the default point size is 12 then this cell will be drawn with",
  1845. "a point size of 16.",
  1846. "",
  1847. "Under X, this scaling behavior depends on having a wide variety of fonts",
  1848. "installed, and wildcarding point-sizes in x11 font names passed to ",
  1849. "define-font.",
  1850. #endif
  1851.  
  1852. DEFUN_5 ("define-user-format",
  1853.      FDdefine_usr_fmt, FAdefine_usr_fmt, DFdefine_usr_fmt, define_usr_fmt)
  1854. #ifdef FUNC_ARG_STRINGS
  1855. "N[1,16]Define format [1-16]? ",
  1856. "sPositive header? ",
  1857. "sNegative header? ",
  1858. "sPositive trailer? ",
  1859. "sNegative trailer? ",
  1860. "sRepresentation of zero? ",
  1861. "sComma? ",
  1862. "sDecimal point? ",
  1863. "sPrecision [0-14 or `float']? ",
  1864. "sScale-factor? ",
  1865. #endif
  1866. #ifdef FUNC_INIT_CODE
  1867. 0,
  1868. "{insert-user-format-part %0 1}",
  1869. "{insert-user-format-part %0 2}",
  1870. "{insert-user-format-part %0 3}",
  1871. "{insert-user-format-part %0 4}",
  1872. "{insert-user-format-part %0 5}",
  1873. "{insert-user-format-part %0 6}",
  1874. "{insert-user-format-part %0 7}",
  1875. "{insert-user-format-part %0 8}",
  1876. "{insert-user-format-part %0 9}",
  1877. #endif
  1878. #ifdef DOC_STRINGS
  1879. "Set the parameters of a user-defined numeric format.",
  1880. "",
  1881. "There are sixteen user-defined numeric formats (maned `user-1' ... `user-16').",
  1882. "Each format specifies a syntax for printing numbers.  They may be used ",
  1883. "inconjuction with the [set-cell-format] and [set-region-format] commands.",
  1884. "",
  1885. "Each format has these parameters (using the 'dollar' format for an example).",
  1886. "",
  1887. "Parameter Name        Example:    How it is used",
  1888. "",
  1889. "Positive header        $        before postive numbers.",
  1890. "Negative header        ($        before negative numbers.",
  1891. "Positive trailer            after positive numbers.",
  1892. "Negative trailer    )        after negative numbers.",
  1893. "Zero            $0.00        if the number is 0.",
  1894. "Comma            ,        between each three digits (1,000,000).",
  1895. "Decimal            .        as a decimal point.",
  1896. "Precision        2        The number of digits to print after the",
  1897. "                    decimal point. This may be an integer",
  1898. "                    in the range [0-14] or `float'.",
  1899. "                    `float' means use however many digits",
  1900. "                    are needed, or however many will fit,",
  1901. "                    whichever is less.",
  1902. "Scale            1        What to multiply the value by before",
  1903. "                    printing. Most often this will be one,",
  1904. "                    but it might be 100 if you're printing",
  1905. "                    percentages, or .000001 if you're",
  1906. "                    printing in megabucks.  (Beware of",
  1907. "                    overflow!)",
  1908. "",
  1909. "Do not use digits for the headers, trailers, the comma, or the decimal point",
  1910. "symbol.  Using digits will confuse the internal routines and produce",
  1911. "incomprehensible results.   (This is a bug that will be fixed.)",
  1912. #endif
  1913.  
  1914.  
  1915.  
  1916. /* help commands */
  1917.  
  1918. DEFUN ("describe-key-briefly",
  1919.        FDbrief_describe_key, FAbrief_describe_key, brief_describe_key)
  1920. #ifdef FUNC_ARG_STRINGS
  1921. "kDescribe key briefly? ",
  1922. #endif
  1923. #ifdef DOC_STRINGS
  1924. "Print the name of the function KEYSEQ invokes.",
  1925. #endif
  1926.  
  1927. DEFUN ("describe-key",
  1928.        FDdescribe_key, FAdescribe_key, describe_key)
  1929. #ifdef FUNC_ARG_STRINGS
  1930. "kDescribe key? ",
  1931. #endif
  1932. #ifdef DOC_STRINGS
  1933. "Display the full documentation of the function KEYSEQ invokes.",
  1934. #endif
  1935.  
  1936. DEFUN ("describe-function",
  1937.        FDdescribe_function, FAdescribe_function, describe_function)
  1938. #ifdef FUNC_ARG_STRINGS
  1939. "CDescribe function? ",
  1940. #endif
  1941. #ifdef DOC_STRINGS
  1942. "Display the full documentation of FUNCTION (a symbol).",
  1943. #endif
  1944.  
  1945. DEFUN_5 ("describe-formula", FDdescribe_formula, FAdescribe_formula,
  1946.      DFdescribe_formula, view_info)
  1947. #ifdef FUNC_ARG_STRINGS
  1948. "SHelp with what formula function? ",
  1949. "mview-info", 
  1950. #endif
  1951. #ifdef FUNC_INIT_CODE
  1952. "{insert-context-word}",
  1953. "{builtin-help %0}",
  1954. #endif
  1955. #ifdef DOC_STRINGS
  1956. "Display the documentation for the given formula FUNCTION",
  1957. #endif
  1958.  
  1959. DEFUN_3 ("help-with-command", FAhelp_with_command, help_with_command)
  1960. #ifdef DOC_STRINGS
  1961. "Display help for the currently executing command.",
  1962. #endif
  1963.  
  1964.  
  1965. DEFUN ("where-is", FDwhere_is, FAwhere_is, where_is)
  1966. #ifdef FUNC_ARG_STRINGS
  1967. "SCommand or keymap? ",
  1968. #endif
  1969. #ifdef DOC_STRINGS
  1970. "Print message listing a key sequence that invokes a specified command.",
  1971. "Argument is a command name or keymap name.  If a keymap name is given,",
  1972. "then the output tells what prefix select that keymap.",
  1973. #endif
  1974.  
  1975. DEFUN ("builtin-help", FDbuiltin_help, FAbuiltin_help, builtin_help)
  1976. #ifdef FUNC_ARG_STRINGS
  1977. "SHelp for what symbol? ",
  1978. #endif
  1979. #ifdef DOC_STRINGS
  1980. "(Internal use -- probably not useful as a command.)",
  1981. "Make one of the help messages built-in to Oleo the current prompt-info.",
  1982. #endif
  1983.  
  1984. DEFUN ("write-info", FDwrite_info, FAwrite_info, write_info)
  1985. #ifdef FUNC_ARG_STRINGS
  1986. "SWrite what info buffer? ",
  1987. "fwWrite %0 to what file? ",
  1988. #endif
  1989. #ifdef DOC_STRINGS
  1990. "(internal use) Write the info buffer NAME to FILE.",
  1991. #endif
  1992.  
  1993.  
  1994. DEFUN_3 ("make-wallchart-info", FAmake_wallchart_info, make_wallchart_info)
  1995. #ifdef DOC_STRINGS
  1996. "(Internal use -- probably not useful as a command.)",
  1997. "Ensure the existence of an info buffer named `wallchart'.",
  1998. "The buffer will contain a categoricly organized list of keybindings.",
  1999. #endif
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005. /* Temporary hacks for multi-line text display. */
  2006.  
  2007. DEFUN ("set-info", FDset_info, FAset_info, set_info)
  2008. #ifdef FUNC_ARG_STRINGS
  2009. "SDisplay what info? ",
  2010. #endif
  2011. #ifdef DOC_STRINGS
  2012. "(internal use -- probably not useful as an interactie command).",
  2013. "Display the info-buffer ARG instead of the cell windows.",
  2014. "Display-cells undoes this.",
  2015. #endif
  2016.  
  2017. DEFUN ("display-cells", FDdisplay_cells, FAdisplay_cells, set_info)
  2018. #ifdef FUNC_ARG_STRINGS
  2019. "#0",
  2020. #endif
  2021. #ifdef DOC_STRINGS
  2022. "(internal use -- probably not useful as an interactie command).",
  2023. "Display the cells windows instead of an info buffer. This is the",
  2024. "opposite of set-info.",
  2025. #endif
  2026.  
  2027. DEFUN_5 ("view-info", FDview_info, FAview_info, DFview_info, view_info)
  2028. #ifdef FUNC_ARG_STRINGS
  2029. "sInfo to view? ", 
  2030. "mview-info",
  2031. #endif
  2032. #ifdef FUNC_INIT_CODE
  2033. 0,
  2034. "{set-info %0}",
  2035. #endif
  2036. #ifdef DOC_STRINGS
  2037. "(internal use only -- probably not useful as an interactive command).",
  2038. "Let the user page through the info buffer named ARG.",
  2039. #endif
  2040.  
  2041. DEFUN ("page-info", FDpage_info, FApage_info, page_info)
  2042. #ifdef FUNC_ARG_STRINGS
  2043. "p",
  2044. #endif
  2045. #ifdef DOC_STRINGS
  2046. "Move forward a page in an info text.  With a prefix, move that many pages.",
  2047. #endif
  2048.  
  2049. DEFUN ("page-info-backwards",
  2050.        FDpage_info_backwards, FApage_info_backwards, page_info_backwards)
  2051. #ifdef FUNC_ARG_STRINGS
  2052. "p",
  2053. #endif
  2054. #ifdef DOC_STRINGS
  2055. "Move backward a page in an info text.  With a prefix, move that many pages.",
  2056. #endif
  2057.  
  2058.  
  2059.  
  2060. /* Graph commands */
  2061.  
  2062. DEFUN_3 ("graph-x11-mono", FDgraph_x11_mono, graph_x11_mono)
  2063. #ifdef DOC_STRINGS
  2064. "Specify that graphing should be done to an X11 window in black and white.",
  2065. #endif
  2066.  
  2067. DEFUN_3 ("graph-x11-color", FDgraph_x11_color, graph_x11_color)
  2068. #ifdef DOC_STRINGS
  2069. "Specify that graphing should be done to an X11 window in color.",
  2070. #endif
  2071.  
  2072. DEFUN ("graph-toggle-axis-logness",
  2073.        FDgraph_toggle_x_logness, FAgraph_toggle_x_logness, graph_set_logness)
  2074. #ifdef FUNC_ARG_STRINGS
  2075. "[xXyY]Which axis? (`x' or `y') ",
  2076. "p?",
  2077. "p",
  2078. #endif
  2079. #ifdef DOC_STRINGS
  2080. "Toggle whether AXIS (`x' or `y') is drawn to a logarithmic scale.",
  2081. "With a 0 or negative prefix, make the axis not be logarithmic.",
  2082. "With a positive prefix, make the axis logarithmic.",
  2083. #endif
  2084.  
  2085.  
  2086. DEFUN ("graph-postscript",
  2087.        FDgraph_postscript, FAgraph_postscript, graph_postscript)  
  2088. #ifdef FUNC_ARG_STRINGS
  2089. "fnWrite postscript graph to? ",
  2090. "[ledLED][L]andscape  [E]mbedded postscript  or [D]efault",
  2091. "[cCmM][C]olor  or [M]onochrome",
  2092. "sPostscript font? ", 
  2093. "nPoint size? ",
  2094. #endif
  2095. #ifdef DOC_STRINGS
  2096. "Specify that graphing should be done in postscript.",
  2097. "Arguments are:",
  2098. "  FILE - the output file for the postscript (may be a pipe, e.g.: `| lpr').",
  2099. "  KIND - [l]andscape, [e]mbedded postscript or [d]efault",
  2100. "  COLOR - [b]lack and white,  or [c]olor",
  2101. "  FONT - a font name (e.g.: TimesRoman)",
  2102. "  PTSIZ - point size for labels.",
  2103. #endif
  2104.  
  2105. DEFUN ("graph-set-axis-low",
  2106.        FDgraph_set_axis_low, FAgraph_set_axis_low, graph_set_axis_lo)
  2107. #ifdef FUNC_ARG_STRINGS
  2108. "[xXyY]Set range start for which axis? (`x' or `y') ",
  2109. "sBeginning of the X axis range [a number or `def']? ",
  2110. #endif
  2111. #ifdef DOC_STRINGS
  2112. "Set the beginning of the range graph on AXIS to LOW.",
  2113. "LOW may be either a real number, or `def' to invoke auto-scaling.",
  2114. #endif
  2115.  
  2116. DEFUN ("graph-set-axis-high",
  2117.        FDgraph_set_axis_high, FAgraph_set_axis_high, graph_set_axis_hi)
  2118. #ifdef FUNC_ARG_STRINGS
  2119. "[xXyY]Set range start for which axis? (`x' or `y') ",
  2120. "sBeginning of the X axis range [a number or `def']? ",
  2121. #endif
  2122. #ifdef DOC_STRINGS
  2123. "Set the beginning of the range graph on AXIS to HIGH.",
  2124. "HIGH may be either a real number, or `def' to invoke auto-scaling.",
  2125. #endif
  2126.  
  2127. DEFUN ("graph-set-x-axis-symbolic", FDgraph_set_axis_symbolic,
  2128.        FAgraph_set_axis_symbolic, graph_set_axis_symbolic)
  2129. #ifdef FUNC_ARG_STRINGS
  2130. "c#x",
  2131. "rSymbols for the %0-axis in range? ",
  2132. "cRead rows or cols in %1? (`r' or `c') ",
  2133. #endif
  2134. #ifdef DOC_STRINGS
  2135. "Declare that the x-axis should range over the names in RANGE read in ORDER.",
  2136. "RANGE should be a set of cells containing the symbols for the x-axis.",
  2137. "The values in those cells correspond to positions in the range being",
  2138. "graphed (e.g.: the cells might contain the names of the months).",
  2139. "ORDER (either `r' or `c') says whether cells should be read row-wise",
  2140. "or column-wise.",
  2141. "",
  2142. "After this command, two kinds of data-sets can be plotted.",
  2143. "Datasets which are explicitly made up of pairs of cells should contain",
  2144. "X values that can be found in RANGE.  Datasets with an implicit X coordinate",
  2145. "will be be proviced with X coordinates from RANGE in the specified order.",
  2146. "",
  2147. "For non-symbolic ranges, use [graph-set-axis-low]",
  2148. "",
  2149. "For symbolic labels on a numeric range, use [graph-set-axis-labels]",
  2150. #endif
  2151.  
  2152. DEFUN ("graph-set-axis-labels", FDgraph_set_axis_labels,
  2153.        FAgraph_set_axis_labels, graph_set_axis_labels)
  2154. #ifdef FUNC_ARG_STRINGS
  2155. "[xXyY]Labels for which axis? (`x' or `y') ",
  2156. "rRead labels for the %0-axis from range? ",
  2157. "[hHvViI]Are position/label pairs [H]oriz, [V]ert, or [I]mplicit-position? ",
  2158. "[rRcC]Read labels from %0 row-wise or column-wise? (`r',or `c') ",
  2159. #endif
  2160. #ifdef DOC_STRINGS
  2161. "Read labels for AXIS from RNG as ORIENTATION pos/label pairs read in ORDER.",
  2162. "",
  2163. "AXIS may be either `x' or `y'.",
  2164. "",
  2165. "ORIENTATION may be:",
  2166. "    `h' - horizontal    if rc contains the position, then rc[1]",
  2167. "                contains the label.",
  2168. "    `v' - vertical        if rc contains the position, then r[1]c",
  2169. "                contains the label.",
  2170. "    `i' - implicit        every cell is a label; positions are assigned",
  2171. "                non-negative integer positions (0, 1, 2...)",
  2172. "",
  2173. "ORDER may be:",
  2174. "    `r' - rows        pairs are read row-wise",
  2175. "    `c' - columns        pairs are read column-wise",
  2176. "",
  2177. "This command does not effect what range will be graphed.  If labels are",
  2178. "assigned positions outside the visible range, they will not be drawn.",
  2179. "See also graph-set-x-symbolic.",
  2180. "This is undone by [graph-default-axis-labels]",
  2181. #endif
  2182.  
  2183. DEFUN ("graph-default-axis-labels", FAgraph_default_axis_labels,
  2184.        FDgraph_default_axis_labels, graph_default_axis_labels)
  2185. #ifdef FUNC_ARG_STRINGS
  2186. "[xXyY]Use default labels for which axis? (`x' or `y') ",
  2187. #endif
  2188. #ifdef DOC_STRINGS
  2189. "Reset the labels for AXIS to their defaults.",
  2190. "This undoes [graph-set-axis-labels]",
  2191. #endif
  2192.  
  2193.  
  2194. DEFUN ("graph-set-style",
  2195.        FDgraph_set_style, FAgraph_set_style, graph_set_style)
  2196. #ifdef FUNC_ARG_STRINGS
  2197. "N[0,9]Set style for which dataset? (0..9) ",
  2198. "sStyle for dataset %0? ",
  2199. #endif
  2200. #ifdef DOC_STRINGS
  2201. "Specify that dataset N should be graphed in STYLE.",
  2202. "STYLE may be any of the gnuplot graph types: ",
  2203. "    lines, points, linespoints, impulses, dots",
  2204. #endif
  2205.  
  2206. DEFUN ("graph-set-axis-title",
  2207.        FDgraph_set_axis_title, FAgraph_set_axis_title, graph_set_axis_title)
  2208. #ifdef FUNC_ARG_STRINGS
  2209. "[xyXY]Set title of which axis? (x or y) ",
  2210. "sTitle for the %0-axis? ",
  2211. #endif
  2212. #ifdef DOC_STRINGS
  2213. "When drawing graphs, label AXIS (`x' or `y') with TITLE.",
  2214. #endif
  2215.  
  2216. DEFUN ("graph-set-data", FDgraph_set_data, FAgraph_set_data, graph_set_data)
  2217. #ifdef FUNC_ARG_STRINGS
  2218. "N[0,9]Set which dataset? (0..9) ",
  2219. "rRead dataset %0 from what range? ",
  2220. "[hHvViI]Are X,Y pairs [H]oriz, [V]ert, or [I]mplicit-X? ",
  2221. "[rRcC]Read labels from %0 row-wise or column-wise? (`r',or `c') ",
  2222. #endif
  2223. #ifdef DOC_STRINGS
  2224. "Specify that dataset N is read from RNG as ORNT x,y pairs read in ORDER",
  2225. "",
  2226. "Datasets are numbered 0..9.",
  2227. "",
  2228. "ORIENTATION may be:",
  2229. "    `h' - horizontal    if rc contains x, then rc[1] contains y",
  2230. "    `v' - vertical        if rc    \"     x,   \"  r[1]c    \"     y",
  2231. "    `i' - implicit        every cell is a y value; x coordinates are",
  2232. "                non-negative integer positions (0, 1, 2...)",
  2233. "",
  2234. "ORDER may be:",
  2235. "    `r' - rows        pairs are read row-wise",
  2236. "    `c' - columns        pairs are read column-wise",
  2237. "",
  2238. #endif
  2239.  
  2240. DEFUN ("graph-set-data-title",
  2241.        FDgraph_set_data_title, FAgraph_set_data_title, graph_set_data_title)
  2242. #ifdef FUNC_ARG_STRINGS
  2243. "N[0,9]Set the title for which dataset? (0..9) ",
  2244. "sTitle for dataset %0? ",
  2245. #endif
  2246. #ifdef DOC_STRINGS
  2247. "Specify that dataset N should be called TITLE. ",
  2248. "The title will be printed in the key for the graph.",
  2249. #endif
  2250.  
  2251. DEFUN_3 ("graph-presets", FDgraph_presets, graph_presets)
  2252. #ifdef DOC_STRINGS
  2253. "Return graphing parameters to their default values.",
  2254. "This does not effect the datasets selected for graphing.",
  2255. #endif
  2256.  
  2257. DEFUN_3 ("graph-clear-datasets", FDgraph_clear_datasets, graph_clear_datasets)
  2258. #ifdef DOC_STRINGS
  2259. "Erase the settings of which datasets will be graphed.",
  2260. "This undoes the effects of all previous invocations of [graph-set-data].",
  2261. #endif
  2262.  
  2263. DEFUN_3 ("graph-make-info", FDgraph_make_info, graph_make_info)  
  2264. #ifdef DOC_STRINGS
  2265. "Update the info-buffer called `graphing-parameters'.",
  2266. "The new contents of the buffer will describe the current settings",
  2267. "of all graphing parameters",
  2268. #endif
  2269.  
  2270. DEFUN_3 ("graph-plot", FDgraph_plot, graph_plot)
  2271. #ifdef DOC_STRINGS
  2272. "Execute a graph.  The parameter of the graph are set using [graph-setup]",
  2273. #endif
  2274.  
  2275.